Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Populate reference Path before running Generating reference source #5419

Merged
merged 2 commits into from
May 8, 2020
Merged

Populate reference Path before running Generating reference source #5419

merged 2 commits into from
May 8, 2020

Conversation

Anipik
Copy link
Contributor

@Anipik Anipik commented May 5, 2020

@Anipik Anipik requested review from ViktorHofer, ericstj and safern May 5, 2020 17:36
@@ -30,6 +30,7 @@
</ItemGroup>

<Target Name="GenerateReferenceAssemblySource"
DependsOnTargets="ResolveAssemblyReferences"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this? I would expect people needs to do a vertical build before running this target. You need the source assembly in order to generate a ref assembly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we do need this, now I see that I was the one that suggested it 😄

cc: @ericstj ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can avoid this like dotnet/runtime@b18753a#diff-037531bd6f403e414dc011246d42d393R115

not sure if thats the correct way

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was thinking about something similar as we only need ReferencePath for projects that have a ReferenceFromRuntime

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double check that you don’t build ProjectReferences when calling this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... If you do, you can use CallTarget instead of DependsOnTargets and set the property which disables building the ProjectReference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was not able to use callTarget because of this issue dotnet/msbuild#1006

Copy link
Member

@ericstj ericstj May 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are other options. What’s the experience right now? If I call This target what does it do WRT building ProjectReferences? (EG: we can call MSBuild on current project, ResolveReferences target passing BuildProjectReferences=false as global property, and get it's ouput)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am able to avoid this by 09b6f82#diff-154f708acf3f9e20aa7bc29fe50f4ff1R32

What’s the experience right now? If I call This target what does it do WRT building ProjectReferences?

It builds all the project references.

@Anipik
Copy link
Contributor Author

Anipik commented May 8, 2020

cc @ViktorHofer

@ViktorHofer
Copy link
Member

Would be nice to add tests at some point(tm)

Copy link
Member

@ViktorHofer ViktorHofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving assuming you validated the experience in dotnet runtime

@Anipik
Copy link
Contributor Author

Anipik commented May 8, 2020

Approving assuming you validated the experience in dotnet runtime

Yes

@Anipik Anipik merged commit ffdceae into dotnet:master May 8, 2020
@Anipik Anipik deleted the genapi branch May 8, 2020 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants